﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AutoMapper;
using Microhard.WeixinMP.Models;
using Microhard.WeixinMP.DataAccess;

namespace Microhard.WeixinMP.DTO
{
    public class WXModelMapper
    {
        public static void InitMap()
        {
            #region Conversation
            Mapper.CreateMap<ConversationModel, Conversation>();
            Mapper.CreateMap<Conversation, ConversationModel>();
            #endregion

            #region Image
            Mapper.CreateMap<ImageModel, Image>();
            Mapper.CreateMap<Image, ImageModel>();
            #endregion

            #region WXAccount
            Mapper.CreateMap<WXMPAccountModel, MPAccount>();
            Mapper.CreateMap<MPAccount, WXMPAccountModel>();
            #endregion

            #region WXUser
            Mapper.CreateMap<WXMPUserModel, MPUser>();
            Mapper.CreateMap<MPUser, WXMPUserModel>();
            #endregion

            #region Info
            Mapper.CreateMap<SendToUserInfoModel, MPInfo>();
            Mapper.CreateMap<MPInfo, SendToUserInfoModel>();
            #endregion

            #region Feedback
            Mapper.CreateMap<FeedbackModel, Feedback>();
            Mapper.CreateMap<Feedback, FeedbackModel>();
            #endregion

            #region Article
            Mapper.CreateMap<ArtileModel, Article>();
            Mapper.CreateMap<Article, ArtileModel>();
            #endregion

            #region ArticleLink
            Mapper.CreateMap<ShareLinkModel, ShareLink>();
            Mapper.CreateMap<ShareLink, ShareLinkModel>();
            #endregion

        }
    }
}
